package be.rivendale.renderer.mk2.data;

import java.io.Serializable;

public class Rectangle implements Serializable {
    private int x;
    private int y;
    private int width;
    private int height;

    public Rectangle(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    @Override
    public boolean equals(Object object) {
        Rectangle other = (Rectangle)object;
        return this.getX() == other.getX()
                && this.getY() == other.getY()
                && this.getWidth() == other.getWidth()
                && this.getHeight() == other.getHeight();
    }
}
